textview: Update handles after flushing scroll changes
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 1 Jun 2015 15:21:20 +0000 (16:21 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 2 Jun 2015 15:30:09 +0000 (17:30 +0200)
Text insertion/pasting might trigger scroll, so we'd have to wait
until the text was revalidated and the scrolling truly happened
before we can check the new handle(s) position.

gtk/gtktextview.c

index bbc033ac949b487a0d865d12751ac567565f3bc3..0a854ab4705fe7cf44e7cda0a003e20c155d54ff 100644 (file)
@@ -2366,6 +2366,10 @@ gtk_text_view_flush_scroll (GtkTextView *text_view)
                                          scroll->xalign,
                                          scroll->yalign);
 
+  if (text_view->priv->text_handle)
+    gtk_text_view_update_handles (text_view,
+                                  _gtk_text_handle_get_mode (text_view->priv->text_handle));
+
   free_pending_scroll (scroll);
 
   return retval;